home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / comm1 / dnload30.zip / SETUP1.WAS < prev    next >
Text File  |  1993-04-18  |  3KB  |  81 lines

  1. ;Download Pro Setup V.2.0  1993 (C) Michael Lee
  2. ;This script is used to setup the Paths for DNLOADPR.WAS and ZipPro.WAS.
  3. ;
  4. integer status,waiting
  5. string zippath,qwkpath,qwkwk,max_retry,max_session
  6. string prowin_path=$PWTASKPATH,storage,dn_zippath,zip_to
  7. proc main
  8. when dialog call check_path
  9. strfmt storage "%s\DNLOADPR" prowin_path
  10. strfmt qwkwk "%s\DNLOADPR" prowin_path
  11. strfmt dn_zippath "%s\DNLOAD" prowin_path
  12. dialogbox 68 26 208 195 2 "Download Pro Setup"
  13.    text  64 10 46 8 left "Pkunzip Path:"
  14.    text  51 26 62 8 left "Mail Packet Path:"
  15.    text  23 41 88 8 left "Mail Packet working Path:"
  16.    editbox 112 9 84 11 zippath 25
  17.    editbox 112 25 84 11 qwkpath 25
  18.    editbox 112 41 84 11 qwkwk 25
  19.    editbox 112 57 85 11 storage 25
  20.    editbox 112 73 85 11 dn_zippath 25
  21.    editbox 112 89 85 11 zip_to 25
  22.    editbox 112 105 27 11 max_retry 2
  23.    editbox 112 120 28 11 max_session 2
  24.    pushbutton 49 171 40 14 "&OK" normal default
  25.    text  32 107 77 8 left "Max. Retry per Number:"
  26.    text  32 122 78 8 left "Max. Retry per Session:"
  27.    pushbutton 122 171 40 15 "&CANCEL" cancel
  28.    text  18 59 92 8 left "Download Pro storage Path:"
  29.    text  53 141 112 27 left "NOTE: Download Pro will create the Storage directory if it does not exist!"
  30.    text  33 75 78 8 left "Downloaded .ZIP Path:"
  31.    text  59 90 49 8 left "Unzip To Path:"
  32. enddialog
  33.  
  34. status=$DIALOG
  35.   waiting=1
  36.   while waiting
  37.   endwhile
  38. ;this section will write the Path information and Dialing info to a file
  39. ;called DNLOAD.INI. This file is saved to your Prowin Directory.
  40.     strfmt S1 "%s\dnload.ini" prowin_path
  41.         strfmt S2 "%s\*.qw*" qwkpath
  42.     profilewr S1 "PATH" "prowin_path" prowin_path
  43.     profilewr S1 "PATH" "zippath" zippath
  44.     profilewr S1 "PATH" "qwkpath" S2
  45.     profilewr S1 "PATH" "qwkwk" qwkwk
  46.     profilewr S1 "DIAL" "max_retry" max_retry
  47.     profilewr S1 "DIAL" "max_session" max_session
  48.     profilewr S1 "PATH" "storage" storage
  49.     profilewr S1 "PATH" "dn_zippath" dn_zippath
  50.     profilewr S1 "PATH" "zip_to" zip_to
  51. endproc
  52.  
  53. proc check_path
  54. string str="D"
  55. integer chkdialog
  56.   chkdialog=$DIALOG
  57.   switch chkdialog
  58.   case 10
  59.          findfirst qwkwk str              ;checks to see if the "Mail Packet Working
  60.        if not found         ;Path:" is present. If not it will create
  61.          mkdir qwkwk        ;it.
  62.        endif
  63.     findfirst storage str        ;checks for the "Download Pro Storage Path:"
  64.        if not found
  65.            mkdir storage
  66.        endif
  67.     findfirst zip_to str        ;checks to see if the "Unzip to Path:" is present.
  68.        if not found
  69.         mkdir zip_to
  70.        endif
  71.     waiting=0
  72.    endcase
  73.    case 1
  74.      exit    ;if cancel is selected. Exit script.
  75.    endcase
  76.   endswitch
  77. endproc
  78.  
  79.  
  80.  
  81.